#pragma once

#include <opencv2\opencv.hpp>
#include <time.h>

#include "SupervisedLearning.h"
#include "MLAlgo.h"
#include "KeySort.h"
#include "MLEvaluation.h"

using namespace cv;
using namespace std;

class ArtificialNeuralNetworks : public SupervisedLearning
{
private:
	CvANN_MLP ann;
	CvANN_MLP_TrainParams params;
	Mat layers;
	typedef SupervisedLearning super;
	float getROCevaluation(Mat& d, Mat& l, CvANN_MLP_TrainParams confParams);

public:
	ArtificialNeuralNetworks();
	ArtificialNeuralNetworks(int numRows, int numAttributes);
	virtual void train();
	virtual void train_auto();
	virtual float predict(Mat& sample);
	virtual void constructConfusionMatrix();
	Mat runGeneticAlgorithm();
	Mat createConfusionMatrix(Mat& d, Mat& l, CvANN_MLP_TrainParams confParams, int k);
};